package com.rm.freedrawview;

import java.io.Serializable;
import java.util.ArrayList;

/**
 * Created by Riccardo on 23/05/2017.
 *
 * @author author
 * @version 1.0.0
 */
public class FreeDrawSerializableState implements Serializable {
    static final long serialVersionUID = 40L;

    private ArrayList<HistoryPath> mCanceledPaths;
    private ArrayList<HistoryPath> mPaths;
    private int mPaintColor;
    private int mPaintAlpha;
    private float mPaintWidth;
    private ResizeBehaviour mResizeBehaviour;
    private int mLastDimensionW;
    private int mLastDimensionH;

    public FreeDrawSerializableState(
            ArrayList<HistoryPath> canceledPaths, ArrayList<HistoryPath> paths,
            int paintColor, int paintAlpha, float paintWidth,
            ResizeBehaviour resizeBehaviour, int lastW, int lastH) {
        setCanceledPaths(canceledPaths != null ? canceledPaths : new ArrayList<HistoryPath>());
        setPaths(paths != null ? paths : new ArrayList<HistoryPath>());
        setPaintWidth(paintWidth >= 0 ? paintWidth : 0);
        setPaintColor(paintColor);
        setPaintAlpha(paintAlpha);
        setResizeBehaviour(resizeBehaviour);
        setLastDimensionW(lastW >= 0 ? lastW : 0);
        setLastDimensionH(lastH >= 0 ? lastH : 0);
    }

    /**
     * getCanceledPaths.
     *
     * @return ArrayList
     */
    public ArrayList<HistoryPath> getCanceledPaths() {
        return mCanceledPaths;
    }

    /**
     * setCanceledPaths .
     *
     * @param canceledPaths canceledPaths
     */
    public void setCanceledPaths(ArrayList<HistoryPath> canceledPaths) {
        this.mCanceledPaths = canceledPaths;
    }

    /**
     * getPaths.
     *
     * @return ArrayList<HistoryPath>
     */
    public ArrayList<HistoryPath> getPaths() {
        return mPaths;
    }

    /**
     * setPaths.
     *
     * @param paths paths
     */
    public void setPaths(ArrayList<HistoryPath> paths) {
        this.mPaths = paths;
    }

    /**
     * getPaintWidth .
     *
     * @return float
     */
    public float getPaintWidth() {
        return mPaintWidth;
    }

    /**
     * setPaintWidth .
     *
     * @param paintWidth paintWidth
     */
    public void setPaintWidth(float paintWidth) {
        this.mPaintWidth = paintWidth;
    }

    /**
     * getPaintColor .
     *
     * @return int
     */
    public int getPaintColor() {
        return mPaintColor;
    }

    /**
     * setPaintColor .
     *
     * @param paintColor paintColor
     */
    public void setPaintColor(int paintColor) {
        this.mPaintColor = paintColor;
    }

    /**
     * getPaintAlpha .
     *
     * @return int
     */
    public int getPaintAlpha() {
        return mPaintAlpha;
    }

    /**
     * setPaintAlpha .
     *
     * @param paintAlpha paintAlpha
     */
    public void setPaintAlpha(int paintAlpha) {
        this.mPaintAlpha = paintAlpha;
    }

    /**
     * getResizeBehaviour .
     *
     * @return ResizeBehaviour
     */
    public ResizeBehaviour getResizeBehaviour() {
        return mResizeBehaviour;
    }

    /**
     * setResizeBehaviour .
     *
     * @param resizeBehaviour resizeBehaviour
     */
    public void setResizeBehaviour(ResizeBehaviour resizeBehaviour) {
        this.mResizeBehaviour = resizeBehaviour;
    }

    /**
     * getLastDimensionW.
     *
     * @return int
     */
    public int getLastDimensionW() {
        return mLastDimensionW;
    }

    /**
     * setLastDimensionW.
     *
     * @param lastDimensionW lastDimensionW
     */
    public void setLastDimensionW(int lastDimensionW) {
        this.mLastDimensionW = lastDimensionW;
    }

    /**
     * getLastDimensionH .
     *
     * @return int
     */
    public int getLastDimensionH() {
        return mLastDimensionH;
    }

    /**
     * setLastDimensionH .
     *
     * @param lastDimensionH lastDimensionH
     */
    public void setLastDimensionH(int lastDimensionH) {
        this.mLastDimensionH = lastDimensionH;
    }

    @Override
    public String toString() {
        return "FreeDrawSerializableState{" +
                "mCanceledPaths=" + mCanceledPaths +
                ", mPaths=" + mPaths +
                ", mPaintColor=" + mPaintColor +
                ", mPaintAlpha=" + mPaintAlpha +
                ", mPaintWidth=" + mPaintWidth +
                ", mResizeBehaviour=" + mResizeBehaviour +
                ", mLastDimensionW=" + mLastDimensionW +
                ", mLastDimensionH=" + mLastDimensionH +
                '}';
    }
}
